﻿using System;
using System.Windows.Data;
using System.Windows.Media;

namespace Kevin.SLUserControlLibrary
{
    public class Color2StringConverter : IValueConverter
    {
        #region IValueConverter

        object IValueConverter.Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value != null && value is SolidColorBrush)
                return (value as SolidColorBrush).Color.ToString();
            else
                return null;
        }

        object IValueConverter.ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion

    }
}